//
//  File.swift
//
//
//  Created by didi on 2022/9/13.
//

import Vapor

public protocol DetailController: ModelController {
    func detailAccess(_ req: Request) async throws -> Bool
}

public extension DetailController {
    func detailAccess(_ req: Request) async throws -> Bool {
        try await req.checkAccess(for: ApiModel.permission(for: .detail))
    }
}
